package com.ehome.poct.core.api.feign;

import com.ehome.poct.core.api.dto.patient.AddPatientDTO;
import com.ehome.poct.core.api.dto.patient.EditPatientDTO;
import com.ehome.poct.core.api.dto.patient.TermPatientDTO;
import com.ehome.poct.core.api.vo.patient.PatientDetailVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @description: 患者信息feign调用
 * @author: muqiu
 * @time: 2022/3/3 17:20
 */
@FeignClient(value = "${service.poct-core:}${service.suffix.poct-core:}",contextId = "patient")
public interface PatientClient {
    /**
     * 添加患者
     * @param addPatientDto
     * @return
     */
    @PostMapping("/patient/patient/add")
    PatientDetailVO addPatient(AddPatientDTO addPatientDto);

    /**
     * 修改患者
     * @param editPatientDto
     */
    @PutMapping("/patient/patient/edit")
    PatientDetailVO editPatient(EditPatientDTO editPatientDto);

    /**
     * 查看患者详情
     * @param patientId
     * @return
     */
    @GetMapping("/patient/patient/get/{patientId}")
    PatientDetailVO getPatient(@PathVariable Long patientId);

    @GetMapping("/patient/patient/getById/{patientId}")
    TermPatientDTO getByPatientId(@PathVariable Long patientId);
}
